package com.ctms.system.service.impl;

import com.ctms.system.dao.CourseStudentMapper;
import com.ctms.system.domain.CourseDO;
import com.ctms.system.domain.CourseStuAmountDO;
import com.ctms.system.domain.CourseStudentDO;
import com.ctms.system.service.CourseStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CourseStudentServiceImpl implements CourseStudentService {
    @Autowired
    CourseStudentMapper courseStudentMapper;

    @Override
    public List<CourseDO> selectAllCourse(Map<String, Object> params) {
        return courseStudentMapper.selectAllCourse(params);
    }

    @Override
    public int countAllCourse(Map<String, Object> params) {
        return courseStudentMapper.countAllCourse(params);
    }

    @Override
    public Integer insertCourseStudent(CourseStudentDO courseStudentDO) {
        return courseStudentMapper.insertCourseStudent(courseStudentDO);
    }


    @Override
    public List<CourseDO> selectStuCourse(Map<String, Object> params) {
        return courseStudentMapper.selectStuCourse(params);
    }

    @Override
    public int count(Map<String, Object> params) {
        return courseStudentMapper.count(params);
    }

    @Override
    public int deleteStuCourse(Integer cid) {
        return courseStudentMapper.deleteStuCourse(cid);
    }

    @Override
    public List<CourseStuAmountDO> countAmount() {
        return courseStudentMapper.countAmount();
    }


    @Override
    public List<CourseStudentDO> selectAllCard(Map<String, Object> params) {
        return courseStudentMapper.selectAllCard(params);
    }

    @Override
    public int countAllCard(Map<String, Object> params) {
        return courseStudentMapper.countAllCard(params);
    }

    @Override
    public CourseStudentDO selectById(Integer id) {
        return courseStudentMapper.selectById(id);
    }

    @Override
    public int updateCard(CourseStudentDO courseStudentDO) {
        return courseStudentMapper.updateCard(courseStudentDO);
    }

    @Override
    public CourseStudentDO selectCourseStuScore(Integer cid, Integer userId) {
        return courseStudentMapper.selectCourseStuScore(cid, userId);
    }
}
